"use strict";

var path = require("path");
var gulp = require("gulp");
var Esdoc = require("esdoc");
var publisher = require('esdoc/out/src/Publisher/publish');
var source = path.join(__dirname, "..", "src", "app", "modules");
var build = path.join(__dirname, "..", "doc", "modules");
/**
 * Generate documentation for modules.
 *
 * @method moduleDoc
 */
function moduleDoc(done) {
  var plugins = this.opts.plugins;
  Esdoc.generate({
    "source": source,
    "destination": build,
    "test": {
      "type": "mocha",
      "source": "./test"
    }
  }, publisher);
  done();
}
module.exports = moduleDoc;
